//
//  KDReportRequestTool.m
//  WangJingApp
//
//  Created by 魏强 on 17/10/11.
//  Copyright © 2017年 KDTech. All rights reserved.
//

#import "KDReportRequestTool.h"
#import "KDBaseTool.h"
#import "KDBaseListParam.h"
#import "KDBaseParam.h"
@implementation KDReportRequestTool
+ (void)getWebsitTypesWithParam:(KDBaseParam *)param success:(void (^)(KDBaseResult *responseObejct))success failure:(void(^)(NSError *error))failure{
    NSString *url = [NSString stringWithFormat:@"%@%@",ServerActionAddr,@"system/getWebsitTypes"];
    [KDBaseTool get:url param:param resultClass:[KDBaseResult class] success:success failure:failure];

}

/**  获取上级单位的请求 */
+ (void)getCompanysWithParam:(KDBaseParam *)param success:(void (^)(KDBaseResult *responseObejct))success failure:(void(^)(NSError *error))failure{
    NSString *url = [NSString stringWithFormat:@"%@%@",ServerActionAddr,@"system/getCompanys"];
    [KDBaseTool get:url param:param resultClass:[KDBaseResult class] success:success failure:failure];

}

/**  获取所有线索的请求 */
+ (void)getCueSourcesWithParam:(KDBaseParam *)param success:(void (^)(KDBaseResult *responseObejct))success failure:(void(^)(NSError *error))failure{
    NSString *url = [NSString stringWithFormat:@"%@%@",ServerActionAddr,@"report/getCueSources"];
    [KDBaseTool get:url param:param resultClass:[KDBaseResult class] success:success failure:failure];
}

/**  获取所有城市的请求 */
+ (void)getCitysWithParam:(KDBaseParam *)param success:(void (^)(KDBaseResult *responseObejct))success failure:(void(^)(NSError *error))failure{
    NSString *url = [NSString stringWithFormat:@"%@%@",ServerActionAddr,@"system/getCitys"];
    [KDBaseTool get:url param:param resultClass:[KDBaseResult class] success:success failure:failure];
}

/**  获取所有信息类别的请求 */
+ (void)getInfoTypesWithParam:(KDBaseParam *)param success:(void (^)(KDBaseResult *responseObejct))success failure:(void(^)(NSError *error))failure{
    NSString *url = [NSString stringWithFormat:@"%@%@",ServerActionAddr,@"report/getInfoTypes"];
    [KDBaseTool get:url param:param resultClass:[KDBaseResult class] success:success failure:failure];
}

+(void)addReportInfoWithParam:(id)param success:(void (^)(KDBaseResult *))success failure:(void (^)(NSError *))failure{
    NSString *url = [NSString stringWithFormat:@"%@%@",ServerActionAddr,@"report/addReportInfo"];
    [KDBaseTool post:url bodyJson:param resultClass:[KDBaseResult class] success:success failure:failure];
}

+ (void)getReportListWithParam:(KDBaseListParam *)param success:(void (^)(KDBaseResult *responseObejct))success failure:(void(^)(NSError *error))failure{
    NSString *url = [NSString stringWithFormat:@"%@%@",ServerActionAddr,@"report/getReportInfolist"];
    [KDBaseTool get:url param:param resultClass:[KDBaseResult class] success:success failure:failure];

}

+ (void)uploadPicInfoWithWithParam:(id)param success:(void (^)(KDBaseResult *responseObejct))success failure:(void(^)(NSError *error))failure{
    NSString *url = [NSString stringWithFormat:@"%@%@",ServerActionAddr,@"fileUpload/addUploadFileInfo"];
    [KDBaseTool post:url bodyJson:param resultClass:[KDBaseResult class] success:success failure:failure];
//    [KDBaseTool post:url param:param resultClass:[KDBaseResult class] success:success failure:failure];
}
@end
